<?php
 
// No direct access
 
defined('_JEXEC') or die('Restricted access'); ?>

<h1><?php echo JText::_( 'Generar Newsletter' ); ?></h1>
<form action="<?php echo $this->action ?>" method="post" name="adminForm" onSubmit="setgood();">

<fieldset>
<table class="adminform">
	<tr>
		<td class="key" valign="top">
			<label for="areaid">
				<?php echo JText::_( 'Noticia del Día' ); ?>:
			</label>
		</td>
		<td>
			<div style="width: 400px; height: 300px; overflow: auto;" class="inputbox">
			<?php foreach($this->articles as $article) { ?>
			  	<div onClick="document.getElementById('noticiaDelDia-<? echo $article->id;  ?>').checked=true;">
			  	<input type="radio" id="noticiaDelDia-<? echo $article->id;  ?>" name="noticiaDelDia" value="<? echo $article->id;  ?>" ><a href="<? echo JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid));?>">
				<? echo $article->title;  ?>
				</a></radio><br/>
				<p>Fuente: <?echo (!empty($article->medio) ? "{$article->medio}, " : '') . $article->category;?></p>
				<hr/>
				</div>
		  	<? } ?>
		  	</div>
		</td>
	</tr>
	<tr>
		<td colspan="2" >
			&nbsp;
		</td>
	</tr>
	<tr>
		<td colspan="2" align="right">
			<input type="submit" value="Generar"/>
		</td>
	</tr>
</table>
<input type="hidden" name="task" value="generar" />
</form>